Q: In my application when my window becomes the key window or the main window, sometimes it won't display itself. What's going on?\
\
A:
\fc0 There is a bug in 2.0 where
\b display
\b0 will sometimes be disabled in a Window when the window becomes key and/or main. The result is that a window (or its delegate) will try to do some drawing in its
\b becomeKeyWindow
\b0 or
\b becomeMainWindow
\b0 (or
\b windowDidBecomeKey:
\b0 or
\b windowDidBecomeMain:
\b0 ) method, and the drawing won't happen because some drawer observes that display is disabled.\
\
Here's a workaround. You can do this little dance in either your delegate method or your override of Window's
The _isInvalid method is a private method, and as such is undocumented. Calling this ensures that you are in the case where this bug bites. We thought this might be prudent in case there was a different time when you really would like display to be disabled. \